﻿<%@ Page Title="Alterar Senha" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeBehind="ChangePassword.aspx.cs" Inherits="CursoUNICEUB.Account.ChangePassword" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <fieldset class="changePassword">
        <legend>Alterar senha</legend>
        <table>
            <tr>
                <td>
                    <asp:Label ID="CurrentPasswordLabel" runat="server">Senha atual:</asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtCurrentPassword" runat="server" CssClass="passwordEntry" TextMode="Password" MaxLength="15" Width="200px"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="CurrentPasswordRequired" runat="server" ControlToValidate="txtCurrentPassword"
                        CssClass="failureNotification" ErrorMessage="Senha atual." ToolTip="Senha atual obrigatório."
                        ValidationGroup="alterar">*</asp:RequiredFieldValidator>
                    <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToCompare="txtCurrentPassword"
                        ControlToValidate="txtConfirmNewPassword" CssClass="failureNotification" Display="Static" 
                        ErrorMessage="Senha nova igual a senha atual." ValidationGroup="alterar" Operator="NotEqual">*</asp:CompareValidator>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="NewPasswordLabel" runat="server">Senha Nova:</asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtNewPassword" runat="server" CssClass="passwordEntry" TextMode="Password" MaxLength="15" Width="200px"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="NewPasswordRequired" runat="server" ControlToValidate="txtNewPassword"
                        CssClass="failureNotification" ErrorMessage="Nova senha." ToolTip="Nova senha obrigatória."
                        ValidationGroup="alterar">*</asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="ConfirmNewPasswordLabel" runat="server" >Confirmação da senha nova:</asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtConfirmNewPassword" runat="server" CssClass="passwordEntry" TextMode="Password" MaxLength="15" Width="200px"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="ConfirmNewPasswordRequired" runat="server" ControlToValidate="txtConfirmNewPassword"
                        CssClass="failureNotification" Display="Static" ErrorMessage="Confirmação de senha."
                        ToolTip="Confirmação de senha obrigatória." ValidationGroup="alterar">*</asp:RequiredFieldValidator>
                    <asp:CompareValidator ID="NewPasswordCompare" runat="server" ControlToCompare="txtNewPassword"
                        ControlToValidate="txtConfirmNewPassword" CssClass="failureNotification" Display="Dynamic"
                        ErrorMessage="Senha nova diferente da confirmação de senha." ValidationGroup="alterar">*</asp:CompareValidator>
                </td>
            </tr>
            <tr>
                <td colspan="2" align="right">
                    <asp:Button ID="ChangePasswordPushButton" runat="server" Text="Alterar" 
                        ValidationGroup="alterar" onclick="ChangePasswordPushButton_Click" />
                    <asp:Button ID="CancelPushButton" runat="server" Text="Cancelar" PostBackUrl="~/Default.aspx" />
                    <asp:ValidationSummary ID="vSum" runat="server" HeaderText="Favor verificar os seguintes campos :"
                        ShowMessageBox="True" ShowSummary="False" ValidationGroup="alterar" />
                </td>
            </tr>
        </table>
    </fieldset>
</asp:Content>
